#include "SMPPDeliverSMResp.hpp"

using namespace smpp::pdu;

DeliverSMResp::DeliverSMResp(const Header &nHeader,
const CoctetString &nMessageId,
const MessageDeliveryResponseTLVs &nMessageDeliveryResponseTLVs):
Header(nHeader),
_MessageId(nMessageId),
MessageDeliveryResponseTLVs(nMessageDeliveryResponseTLVs){}

DeliverSMResp::DeliverSMResp(const DeliverSMResp &nDeliverSMResp):
Header(nDeliverSMResp),
_MessageId(nDeliverSMResp.getMessageId()),
MessageDeliveryResponseTLVs(nDeliverSMResp){}

void DeliverSMResp::setMessageId(const CoctetString &sMessageId){
	_MessageId = sMessageId;
}

const CoctetString &DeliverSMResp::getMessageId() const{
	return _MessageId;
}

void DeliverSMResp::calcCommandLength(){
	_CommandLength = 16 + _MessageId.size() +
		MessageDeliveryResponseTLVs::getLength();
}
